package com.xqboss.apps.service.equipment;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.xqboss.apps.domain.equipment.EquipmentUpgradeConfigBreak;
import com.xqboss.apps.mapper.equipment.EquipmentUpgradeConfigBreakMapper;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 * 装被升级模式二-突破材料 服务实现类
 * </p>
 *
 * @author 木鱼
 * @since 2024-03-01
 */
@Service
@Slf4j
public class EquipmentUpgradeConfigBreakService extends ServiceImpl<EquipmentUpgradeConfigBreakMapper, EquipmentUpgradeConfigBreak> {

    /**
     * 根据升级配置id获取突破材料
     *
     * @param id
     * @return
     */
    public List<EquipmentUpgradeConfigBreak> getBreakMaterialsByConfigId(Long id) {
        List<EquipmentUpgradeConfigBreak> upgradeConfigBreaks = list(new LambdaQueryWrapper<EquipmentUpgradeConfigBreak>()
                .eq(EquipmentUpgradeConfigBreak::getUpgradeConfigId, id));
        return upgradeConfigBreaks;
    }
}